package com.example.thirdhomework

import android.content.Intent
import android.os.Bundle
import android.util.Log
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import com.example.thirdhomework.databinding.ActivitySecondBinding

class SecondActivity : AppCompatActivity() {
    private val binding by lazy{ActivitySecondBinding.inflate(layoutInflater)}
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()

        setContentView(binding.root)
        binding.button.setOnClickListener {
            val intent = Intent()
            intent.putExtra(KEY2,binding.editTextText.text.toString())
            setResult(RESULT_OK,intent)
            finish()
        }
    }
}